const MyPromise = require('./MyPromise')

let p1 = new MyPromise(resolve => resolve(4))
let p2 = new MyPromise(resolve => resolve(5))

p1.then(res => console.log('res1 => ', res)).then(() => console.log('res1 finish'))
p2.then(res => console.log('res2 => ', res)).then(() => console.log('res2 finish'))
p1.then(res => console.log('res3 => ', res)).then(() => console.log('res3 finish'))


// res1 =>  4
// res2 =>  5
// res3 =>  4
// res1 finish
// res2 finish
// res3 finish